home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1993 January / 1993-01.d64 / file counter (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  650b  |  25 lines

  1. 0 clr
  2. 100 data 162,0,142,81,32,142,82,32,142,83,32,232,142,80,32
  3. 110 data 32,198,255,32,228,255,141,84,32,165,144,208,37,32,228,255
  4. 120 data 238,80,32,208,3,238,81,32,238,82,32,208,3,238,83,32
  5. 130 data 205,84,32,240,228,141,84,32,169,0,141,82,32,141,83,32
  6. 140 data 240,215,76,204,255
  7. 200 for j=8192 to 8259
  8. 210 read x:t=t+x
  9. 220 poke j,x
  10. 230 next j
  11. 240 if t<>8286 then stop
  12. 300 input "name of file";f$
  13. 310 open 15,8,15
  14. 320 open 1,8,3,f$
  15. 330 input#15,e,e$:if e<>0 then print e$:close 15:stop
  16. 340 sys 8192
  17. 350 input#15,e,e$,e1,e2:if e<>0 then print e$:close 15:stop
  18. 360 close 1:close 15
  19. 370 print peek(8272)+peek(8273)*256;"characters"
  20. 380 n=peek(8274)+peek(8275)*256
  21. 390 print "last";
  22. 400 if n>0 then print n+1;"characters: ";
  23. 410 if n=0 then print " character: "
  24. 420 print peek(8276)
  25.